const express = require('express');
const jwt = require('jsonwebtoken');

let token = jwt.sign({ username: 'admin' }, 'itbbj@@', { expiresIn: 60 });
console.log(token);

jwt.verify(token, 'itbbj@@', (err, data) => {
  if (err) {
    console.log('校验失败');
    return;
  }
  console.log(data);
});
